import request from '@/utils/request'

export function trainingDetail(projectId) {
	return request({
		'url': '/safety/training/by-project',
		'method': 'get',
		'data': { 'projectId': projectId }
	})
}

export function trainingOver(data) {
	return request({
		'url': '/safety/training/study',
		'method': 'post',
		'data': data
	})
}

export function examPapers(projectId) {
	return request({
		'url': '/exam/papers',
		'method': 'get',
		'data': { 'projectId': projectId }
	})
}

export function getPapers(projectId) {
	return request({
		'url': '/exam/questions',
		'method': 'get',
		'data': { 'projectId': projectId }
	})
}

export function postPapers(data) {
	return request({
		'url': '/exam/papers',
		'method': 'post',
		'data': data
	})
}

export function examDetail(paperId) {
	return request({
		'url': `/exam/papers/${paperId}`,
		'method': 'get',
	})
}


export function threeEdu(data) {
	return request({
		'url': '/tertiary-education',
		'method': 'get',
		'data': data
	})
}

export function threeSave(data) {
	return request({
		'url': '/tertiary-education',
		'method': 'post',
		'data': data
	})
}
//编辑三级/app/tertiary-education
export function threeEdit(data) {
	return request({
		'url': '/tertiary-education',
		'method': 'put',
		'data': data
	})
}

//获取三级详情/app/tertiary-education/{id}
export function threeDetail(id) {
	return request({
		'url': '/tertiary-education/' + id,
		'method': 'get',
	})
}
///app/tertiary-education/by-project
export function threeProject(data) {
	return request({
		'url': '/tertiary-education/by-project',
		'method': 'get',
		'data': data
	})
}

// 安全培训资料学习状态
export function trainingStatus(data) {
	return request({
		'url': '/safety/training/study-status',
		'method': 'get',
		'data': data
	})
}

// 高级管理员查看学习记录
export function superTrainingStatus(data) {
	return request({
		'url': '/exam/listExamUserByProjectId',
		'method': 'get',
		'data': data
	})
}